//
//  MoreInfoCell.m
//  MarkPlatform
//
//  Created by 敖然 on 2017/12/23.
//  Copyright © 2017年 AT. All rights reserved.
//

#import "MPMoreInfoCell.h"

@interface MPMoreInfoCell()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *detailTitleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *arrow;

@end

@implementation MPMoreInfoCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(MPMenuModel *)model {
    _model = model;
    
    self.titleLabel.text = model.title;
    if (model.detailText.length) {
        self.detailTitleLabel.hidden = NO;
        self.detailTitleLabel.text = model.detailText;
        self.arrow.hidden = YES;
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    else {
        self.detailTitleLabel.hidden = YES;
        self.arrow.hidden = NO;
        self.selectionStyle = UITableViewCellSelectionStyleDefault;
    }
}

+ (CGFloat)cellHeight {
    return 50.0f;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
